<?php

// uncomment the following to define a path alias
// Yii::setPathOfAlias('local','path/to/local-folder');

// This is the main Web application configuration. Any writable
// CWebApplication properties can be configured here.

require_once( dirname(__FILE__) . '/../helpers/common_helper.php');

return array(
	'basePath'=>dirname(__FILE__).DIRECTORY_SEPARATOR.'..',
	'name'=>'Console Application',

	// preloading 'log' component
	'preload'=>array('log'),

	// autoloading model and component classes
	'import'=>array(
		'application.models.*',
		'application.components.*',
		'application.helpers.*',
		'application.widgets.*',
		'application.modules.file.FileModule',
		'application.modules.file.models.*',
		'application.modules.notification.NotificationModule',
		'application.modules.notification.models.Notification',
		'application.modules.user.UserModule',
		'application.modules.user.models.User',
		'application.modules.user.components.UserIdentity'
	),
	
	// application components
	'components'=>array(
		'mailer'=>array(
			'class'=>'ext.swiftMailer.SwiftMailer',

			'mailer'=>'smtp',
			
			'host' => 'smtp.mail.ru',
			'username' => 'smtp_server',
			'password' => 'LEXM.9^TAXqZN',
			
			'sendmailCommand'=>'/usr/sbin/sendmail -t -i',

		),
		// uncomment the following to use a MySQL database
		'db'=>require(dirname(__FILE__) . '/db.php'),
		'log'=>array(
			'class'=>'CLogRouter',
			'routes'=>array(
				array(
					'class'=>'CFileLogRoute',
					'levels'=>'error, warning',
				),
				// uncomment the following to show log messages on web pages
				/*
				array(
					'class'=>'CWebLogRoute',
				),
				*/
			),
		),
	),

	// application-level parameters that can be accessed
	// using Yii::app()->params['paramName']
	'params'=> array(
		// this is used in contact page
		'systemEmail'=>'smtp_server@mail.ru',
		
		'defaultLang'=>'ru',
		'adminDefaultLang'=>'ru',
		
		'adminTheme'=>'admin',
		'adminPaginationPageSize'=>10,

		'registrationAdminApproveRequired'=>false,
		
		'cachePages'=>false,
		'cacheEnabled'=>true,

		'dateFormat'=>'d.m.Y H:i',
		
		
		'uploadTimeoutGuest'=>1000,	// интервал отправки для гостя
		'uploadTimeoutAuth'=>5000,	// интервал отправки для авторизованного
		'maxFileSize'=>2,		// макс размер файла Mb
		'maxTextSize'=>1024,		// макс размер текста b
		'uploadLifeTime'=>1,		// срок жизни загрузки

	)
);